<extend name="Console:index"/>
<block name="main">
    <h1 class=" text-center" style="color: #000000">角色管理</h1>

     <div><a href="{:U('Role/role')}" class="btn btn-warning">增加角色</a></div>
            <table class="table">
                <tr>
                    <th>ID</th>
                    <th>角色名称</th>
                    <th>父角色</th>
                    <th>角色描述</th>
                    <th>角色状态</th>
                    <th>配置权限</th>
                </tr>

                <volist name="list" id="l" >
                    <tr>
                        <td>{$l.id}</td>
                        <td>
                            <a href="{:U('Role/role',array('rid'=>$l['id']))}">{$l.name}</a>
                        </td>
                        <td>
                            {$l.pid}
                        </td>

                        <td>
                            {$l.remark}
                        </td>
                        <td>
                            <eq name="l.status" value="1">
                                <a href="{:U('Role/es',array('rid'=>$l['id'],'st'=>1))}">启用</a>
                                <else/>
                               <a href="{:U('Role/es',array('rid'=>$l['id'],'st'=>0))}" style="color: red">禁止</a></eq>
                        </td>
                        <td>
                          <eq name="l.status" value="1"><a href="{:U('Access/index',array('rid'=>$l['id']))}" class="btn btn-primary">配置权限<span class="badge">{$l.num}</span></a></eq>
                        </td>

                    </tr>

                </volist>


            </table>

    </div>
<script type='text/javascript'>
    $(function(){
        $('.brand12').css('border-bottom','4px solid #e97500');
    })
</script>
</block>